<?php

namespace App\Http\Api\Controllers\Toutiao;

use App\Exceptions\InvalidRequestException;

use App\Http\Api\Services\Toutiao\MediaService;
use App\Http\Controllers\Controller;
use App\Lib\Naipan\Naipan;
use Illuminate\Http\Request;



class MediaController extends Controller
{

    protected $service;
    public function __construct(MediaService $service)
    {
        $this->service = $service;
    }

    public function wttEffect(Request $request){

        $data = $request->input('data',null);

        if(!is_array($data)){
            $data = json_decode($data,true);
        }

        $result = $this->service->wttEffect($data);


        return res('ok',$result);

    }


}
